
<#include "/common/head.html"/>

 <div class="easyui-panel addPage" data-options="fit:true,border:false,novalidate:true">
    <form class="easyui-form" id="ff" method="post" data-options="novalidate:true">
     
        <table class="table1">
        		
            <tr>
           		<th><span>编码：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="m_code" value="${model.m_code!}" data-options=""></input>
           		</td>           	
           		<th><span>名称：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="m_name" value="${model.m_name!}" data-options=""></input>
           		</td>
            </tr>
            <tr>
           		<th><span>规格：</span></th>
               	<td colspan="3">
	            	<input class="easyui-textbox" type="text" name="m_standard" value="${model.m_standard!}" data-options=""></input>
           		</td>            
            </tr>   
             <tr>
           		<th><span>需求数量：</span></th>
               	<td>
	            	<input class="easyui-numberbox" type="text" name="p_num" value="${model.p_num!}" data-options=""></input>
           		</td>            
                <th><span>实际数量：</span></th>
               	<td>
	            	<input class="easyui-numberbox" type="text" name="r_num" value="${model.r_num!}" data-options=""></input>
           		</td>            
            </tr> 
            <tr>
           		<th><span>备注：</span></th>
               	<td colspan="3">
	            	<input class="easyui-numberbox" type="text" name="m_remark" value="${model.m_remark!}" data-options=""></input>
           		</td>            
            </tr>   
        </table>
    </form>
</div>
<script>
top.window.subPage.save = save;
function save() {
	if($("#ff").form('enableValidation').form('validate')) {
		$.post("update", getParam(), function(data) {
			top.window.closeWindow();
			top.window.subPage.loadCurrDatagrid();
		});
	}
}
function getParam() {
	var param = {			
	     	"model.id":"${model.id}",
       	    "model.m_code": getInputValue("m_code"), 
       	    "model.m_name": getInputValue("m_name"), 
       	    "model.m_standard":  getInputValue("m_standard"), 
       		"model.p_num":  getInputValue("p_num"), 
       		"model.r_num":  getInputValue("r_num"), 
       		"model.m_remark":  getInputValue("m_remark")
	}
	for(key in param) {
		if(!param[key]) {
			delete param[key];
		}
	}
	return param;
}

//扩展js
$(function() {
 changeComboboxToMult("roles");
});;
</script>
<#include "/common/foot.html"/>
